翻訳と辞書
Words near each other
・ Oberon Dam
・ Oberon High School
・ Oberon Mall
・ Oberon Media
・ Oberon Old and New
・ Oberon Peak
・ Oberon Press
・ Oberon railway line
・ Oberon Shire
・ Oberon Tarana Heritage Railway
・ Oberon Township, Benson County, North Dakota
・ Oberon Zell-Ravenheart
・ Oberon, New South Wales
・ Oberon, North Dakota
・ Oberon, the Faery Prince
Oberon-2 (programming language)
・ Oberon-class submarine
・ Oberonia
・ Oberonia titania
・ Oberonioides
・ Oberoppurg
・ Oberostendorf
・ Oberottendorf railway station
・ Oberotterbach
・ Oberottmarshausen
・ Oberpallen
・ Oberperfuss
・ Oberpfaffenhofen
・ Oberpfalz Jura
・ Oberpframmern


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Oberon-2 (programming language) : ウィキペディア英語版
Oberon-2 (programming language)

Oberon-2 is an extension of the original Oberon programming language that adds limited reflection and object-oriented programming facilities, open arrays as pointer base types, read-only field export and reintroduces the FOR loop from Modula-2.
It was developed in 1991 at ETH Zurich by Niklaus Wirth and Hanspeter Mössenböck, who is now at Institut für Systemsoftware (SSW) of the University of Linz, Austria. Oberon-2 is a superset of Oberon, and is fully compatible with it. Oberon-2 was a redesign of Object Oberon.
Oberon-2 inherited limited reflection and single inheritance ("type extension") without interfaces or mixins from Oberon, but added efficient virtual methods ("type bound procedures"). Method calls were resolved at run-time using C++-style virtual method tables.
Compared to fully object-oriented programming languages like Smalltalk, in Oberon-2 basic types are not objects, classes are not objects, many operations are not methods, there is no message passing (to a certain extent it can be emulated by reflection and through message extension, as demonstrated in ETH Oberon), and polymorphism is limited to subclasses of a common class (no duck typing like in
Python,〔http://www.drdobbs.com/templates-and-duck-typing/184401971〕 and it's not possible to define interfaces like in Java). Oberon-2 does not support encapsulation at object/class level, but modules can be used for this purpose.
Reflection in Oberon-2 does not use meta-objects, but simply reads from type descriptors compiled into the executable binaries, and exposed in the modules that define the types and/or procedures. If the format of these structures are exposed at the language level (as is the case for ETH Oberon, for example), reflection could be implemented at the library level. It could therefore be implemented almost entirely at library level, without changing the language code. Indeed, ETH Oberon makes use of language-level and library-level reflection capabilities extensively.
Oberon-2 provides built-in run-time support for garbage collection similar to Java and performs bounds and array index checks, etc. that eliminate the potential stack and array bounds overwriting problems and manual memory management issues inherent in C/C++. Separate compilation using symbol files and name-spaces via the module architecture ensure quick rebuilds since only modules with changed interfaces need to be recompiled.
The language Component Pascal 〔(What's New in Component Pascal (changes from Oberon-2 to CP), Cuno Pfister (2001) )〕 is a refinement (a superset) of Oberon-2.
== Example Oberon-2 code ==

The following Oberon-2 code would implement a very minimal list class:

MODULE Lists;
(
*
*
* declare global constants, types and variables
*
*
*)
TYPE
List
* = POINTER TO ListNode;
ListNode = RECORD
value : Integer;
next : List;
END;
(
*
*
* declare procedures
*
*
*)
PROCEDURE (l : List) Add
* (v : Integer);
BEGIN
IF l = NIL THEN
NEW(l); (
* create record instance
*)
l.value := v
ELSE
l.next.Add(v) (
* recursive call to .add(n)
*)
END
END Add;
PROCEDURE (l : List) Get
* () : Integer;
VAR
v : Integer;
BEGIN
IF l = NIL THEN
RETURN 0 (
* .get() must always return an INTEGER
*)
ELSE
v := l.value; (
* this line will crash if l is NIL
*)
l := l.next;
RETURN v
END
END Get;
END Lists.


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Oberon-2 (programming language)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.